package com.ruicar.afs.cloud.bizcommon.rules.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.ruicar.afs.cloud.bizcommon.enums.rules.RuleOperateType;
import lombok.Data;

import java.util.Date;

@Data
@TableName("afs_rule_operate_his")
public class AfsRuleOperateHis {
    @TableId(type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @JsonSerialize(using = ToStringSerializer.class)
    /** 原规则ID */
    private Long sourceRuleId;
    /**
     * 操作历史类型;active-激活
     * delete-删除
     * expired-过期
     * modify-编辑
     * changedate-有效期修改
     */
    private RuleOperateType hisType;
    /**
     * 修改后规则号
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long targetRuleId;
    /**
     * 操作人员
     */
    private String operator;
    /**
     * 操作时间
     */
    private Date operateDate;
}
